package com.sfh.cpc.mass.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sfh.cpc.R;
import com.sfh.cpc.com.entity.ENote;
import com.sfh.cpc.com.widget.WidgetMassContent;
import com.sfh.cpc.com.widget.WidgetMassUserInfo;

/**
 * 功能描述: TODO
 *
 * @author SunFeihu 孙飞虎
 * @date 2018/8/27
 */
public class MassNoteAdapter extends BaseQuickAdapter<ENote, BaseViewHolder> {
    public MassNoteAdapter() {
        super(R.layout.mass_note_adapter);
    }

    @Override
    protected void convert(BaseViewHolder helper, ENote item) {
        WidgetMassUserInfo userInfo = helper.getView(R.id.wgUserInfo);
        userInfo.showData(item.getUser());
        WidgetMassContent content = helper.getView(R.id.wgContent);
        content.showData(item);
        helper.setGone(R.id.ivVIP, TextUtils.equals("1",item.getNoteVip()));
    }
}
